<!-- 查看周期 月 周的详情数据 -->
<template>
  <div class='total_detail'>
    <div class="total_detail_title">执行周期：{{executionCycle}}</div>
    <div class="total_table">
      <dt-edit-table :columns="columns" :tableData="tableData" :operateType="operateType" v-if="tableData.length>0"></dt-edit-table>
    </div>
  </div>
</template>

<script>
import columnsAll from './columns'
import dtEditTable from '@/views/casemanagement/marketingCenter/synthetic/components/targetManage/dt-edit-table.vue'
import totalApi from '@/biz/synthetic/totalSummary'
export default {
  components: { dtEditTable },
  props: {},
  data() {
    return {
      executionCycle: '',
      columns: [],
      tableData: [],
      operateType: 0,
    }
  },
  computed: {},
  watch: {},
  methods: {
    initData(data) {
      console.log(this.data)
      this.tableData = []
      this.executionCycle = data.executionCycle
      let params = {
        type: data.type,
        id: data.cycle,
        dataType: data.dataType,
      }
      totalApi.reachAllInfo(params).then((res) => {
        console.log(res)
        if (res) {
          this.tableData = res
        }
      })
    },
  },
  created() {
    this.columns = columnsAll.detailColumns()
  },
  mounted() {},
}
</script>
<style lang='scss' scoped>
.total_detail {
  .total_table {
    height: 600px;
    overflow: auto;
  }
  .total_detail_title {
    height: 30px;
    line-height: 30px;
    margin-bottom: 15px;
  }
}
</style>